{{ $cols := .Get "cols" | default 3 }}
<div class="not-prose grid grid-cols-1 md:grid-cols-{{ math.Max 2 (sub $cols 1) }} lg:grid-cols-{{ $cols }} gap-4">
  {{ $items := index .Page.Params (.Get "items" | default "grid") }}
  {{ range $items }}
    {{ $opts := dict "title" .title "link" .link "description" .description "icon" .icon "image" .image }}
    {{ partial "components/card.html" $opts }}
  {{ end }}
</div>
